<template>
  <div>
    <p>pageRoute: #/directiveTest</p>
    <br /><br />
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="内置指令" name="first">
        <Directives />
      </el-tab-pane>
      <el-tab-pane label="自定义指令" name="second">
        <CustomerDirectives />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import Directives from './Directives'
import CustomerDirectives from './CustomerDirectives'
export default {
  name: 'directivesTest',
  components: { Directives, CustomerDirectives },
  data() {
    return {
      activeName: 'second'
    }
  },
  methods: {
    handleClick(tab, event) {
      // tab 被选中时触发
      // console.log(tab.$el, event.target)
    }
  },
  activated: {},
  deactivated: {}
}
</script>
<style lang="less" scoped></style>
